BEGIN TRANSACTION GO ALTER TABLE dbo.gen_Appconfig ADD LockRetailPrice bit NOT NULL CONSTRAINT DF_gen_Appconfig_LockRetailPrice DEFAULT (0) GO COMMIT -- //////////////// EMPLOYEES ID IDENTITY FROM TABLE SET IT //////////////// BEGIN TRANSACTION GO Update gen_PartiesInfo SET EmployeeID = 1 WHERE SectorID <> 13 Update gen_PartiesInfo SET EmployeeID = 6 WHERE EmployeeID = 10 Update gen_PartiesInfo SET EmployeeID = 7 WHERE EmployeeID = 11 Update gen_PartiesInfo SET EmployeeID = 8 WHERE EmployeeID = 12 GO COMMIT ---------------------------------------------- BEGIN TRANSACTION GO ALTER TABLE dbo.gen_ProductsInfo ADD GST numeric(9, 2) NOT NULL CONSTRAINT DF_gen_ProductsInfo_GST DEFAULT 0 GO COMMIT BEGIN TRANSACTION GO Update gen_ProductsInfo SET GST = 18 WHERE GroupID = 2 GO COMMIT ---------------------------- BEGIN TRANSACTION GO UPDATE data_SalesDetail SET StoreID = 4 UPDATE data_SalesDetail SET StoreID = 1 WHERE (SalesID IN (SELECT SalesID FROM data_SalesInfo WHERE (PartyID = 210))) UPDATE data_SalesDetail SET StoreID = 2 WHERE (SalesID IN (SELECT SalesID FROM data_SalesInfo WHERE (PartyID = 225))) UPDATE data_SalesDetail SET StoreID = 3 WHERE (SalesID IN (SELECT SalesID FROM data_SalesInfo WHERE (PartyID = 224))) GO COMMIT ---------------------------- SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dbo].[vw_ProductsInfo] AS SELECT dbo.gen_ProductsInfo.GroupID, dbo.gen_GroupInfo.GroupTitle, dbo.gen_ProductsInfo.CategoryID, dbo.gen_CategoryInfo.CategoryTitle, dbo.gen_ProductsInfo.ProductID, dbo.gen_ProductsInfo.ProductCode, dbo.gen_ProductsInfo.ProductTitle, dbo.gen_ProductsInfo.UnitID, dbo.gen_Units.UnitTitle, dbo.gen_Units.Scale, dbo.gen_ProductsInfo.UnitPrice, dbo.gen_ProductsInfo.SalePrice, dbo.gen_ProductsInfo.Remarks, dbo.gen_ProductsInfo.Discontinue, dbo.gen_ProductsInfo.Opening, dbo.gen_ProductsInfo.DisplayInOrder, dbo.gen_ProductsInfo.UnitPrice2, dbo.gen_ProductsInfo.SalePrice2, dbo.gen_ProductsInfo.Weight, dbo.gen_ProductsInfo.InQty, dbo.gen_ProductsInfo.OutQty, dbo.gen_ProductsInfo.BalQty, dbo.gen_ProductsInfo.WH1, dbo.gen_ProductsInfo.WH2, dbo.gen_ProductsInfo.WH3, dbo.gen_ProductsInfo.GST FROM dbo.gen_ProductsInfo LEFT OUTER JOIN dbo.gen_GroupInfo ON dbo.gen_ProductsInfo.GroupID = dbo.gen_GroupInfo.GroupID LEFT OUTER JOIN dbo.gen_CategoryInfo ON dbo.gen_ProductsInfo.CategoryID = dbo.gen_CategoryInfo.CategoryID LEFT OUTER JOIN dbo.gen_Units ON dbo.gen_ProductsInfo.UnitID = dbo.gen_Units.UnitId WHERE (0 = 0)